<template>
  <div>
    <mt-header :title="headerTitle">
      <router-link to="" slot="left">
        <mt-button icon="back" @click="$router.back(-1)"></mt-button>
      </router-link>
    </mt-header>
    <!-- <button @click="onTap">点击按钮将值传给父组件</button> -->
    <!-- {{parentId}} -->
  </div>
</template>
<script>
export default {
  data() {
    return {
      msg: {
        age: 19,
        name: "shaoyana"
      },
      headerTitle: this.title || "标题"
    };
  },
  props: ["parentId", "title"],
  // computed: {
  //   headerTitle () {
  //     return this.title || '标题'
  //   },
  // },
  methods: {
    onTap() {
      this.$emit("func", this.msg);
    }
  }
};
</script>
<style scoped>
.mint-header {
  background: #00bcd461;
  font-size: 20px;
  height: 50px;
  border-bottom: 1px solid #fff;
}
</style>